<!DOCTYPE html>
<html lang="en">

{include file='index/header'}

<body id="order" class="flexv">
<div id="common-header" class="flex">
    <a href="{:url('User/index')}" class="cBtn back"><i class="iconfont icon-back"></i></a>
    <h1>我的订单</h1>
</div>
<div class="flexitemv scroll main">
    <div class="flex tab">
        <a href="{:url('indentList')}" class="flexitemv center {if condition='($Think.get.type eq null) and ($Think.get.status eq null)'}on{/if}"><span>全部</span></a>
        <a href="{:url('indentList',['status'=>0])}" class="flexitemv center {eq name='Think.get.status' value='0'}on{/eq}"><span>待付款</span></a>
        <a href="{:url('indentList',['status'=>1,'type'=>0])}" class="flexitemv center {eq name='Think.get.type' value='0'}on{/eq}"><span>待发货</span></a>
        <a href="{:url('indentList',['status'=>1,'type'=>1])}" class="flexitemv center {eq name='Think.get.type' value='1'}on{/eq}"><span>已发货</span></a>
        <a href="{:url('indentList',['status'=>1,'type'=>2])}" class="flexitemv center {eq name='Think.get.type' value='2'}on{/eq}"><span>已完成</span></a>
    </div>
    <ul class="list">
        {volist name='list' id='v'}
        <li>
            <div class="flex centerv title">
                <p class="type">{if condition='$v.i_type eq 2'}付费套餐{else /}免费领取{/if}</p>
                <p class="state">{eq name='v.i_status' value='0'}待付款{else /}已付款{/eq}</p>
            </div>
            <div class="flex goods-item">
                <a href="goods.html" class="flexitem">
                    <div class="img"><img src="{:config('image_path')}{$v.product.p_photo}" alt=""></div>
                    <div class="flexitemv content">
                        <h2>{$v.product.p_name}</h2>
                        <p>{eq name='v.i_type' value='1'}免费领取{else /}常规套装{/eq}{eq name='v.i_type' value='1'}{notempty name='v.spec'}  /  {$v.spec.s_name} ¥{$v.spec.s_price}{/notempty}  /  {eq name='v.i_packing' value='1'}正常包装 ¥{:config('packing')}{else /}不包装{/eq}  /  邮费 ¥15{/eq}</p>
                        <span>¥ {:round($v.product.p_price,2)}</span>
                    </div>
                </a>
            </div>
            <div class="flex centerv bottom">
                <div class="flexitemv tips">
                    <p>合计：<span>¥ {:round($v.i_totprice,2)}</span></p>
                    <time>{$v.create_time}</time>
                </div>
                <div class="flex operation">
                    {eq name='v.i_status' value='0'}<a href="{:url('Indent/indentDetail',['id'=>$v.id])}" class="active">去付款</a>{/eq}
                    {if condition='($v.i_type eq 1) and ($v.i_status eq 1) and ($v.express neq null)'}<a href="{:url('User/logistics',['id'=>$v.id])}" style="color: #4F84D2; border-color: #4F84D2;">查看物流</a>{/if}
                    <a href="{:url('Indent/indentDetail',['id'=>$v.id])}">订单详情</a>
                </div>
            </div>
        </li>
        {/volist}
    </ul>
</div>
</body>
{include file='index/footer'}
</html>